<template>
  <div class="floor-the-container">
    <ul class="find-similar-ul j_rec_goods_list clearfix">
      <li
        class="similar-li j_similar_li j_similar_goods expo_loaded"
        v-for="(item,i) in list"
        :key="i"
      >
        <div class="similar-product">
          <div class="similar-posre">
            <img
              class="j_rec_goods_pic opa1 ll_fadeIn"
              :src="item.img"
              alt=""
            />
            <span class="similar-product-text"
              v-text="item.desc"></span
            >
            <p class="similar-product-info">
              <span class="similar-product-price"
                >￥&nbsp;<span class="big-price" v-text="item.price"></span></span
              >
              <span class="rec-price-tag"> 满减 </span>
              <span class="guess-button j_see_similar"> 看相似 </span>
            </p>
            <p class="similar-product-info"></p>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  props: {
    list: { type: Array, required: true },
  },
};
</script>
<style lang="scss" scoped>
.similar-li:nth-child(odd) {
  padding-right: 0.125rem;
}
.similar-li:nth-child(2n) {
  padding-left: 0.125rem;
}
.similar-li {
  float: left;
  width: 50%;
  box-sizing: border-box;
  padding-bottom: 0.125rem;
  position: relative;
}
.similar-product {
  background-color: #fff;
  font-size: 0;
  padding-bottom: 0;
  border-radius: 0.1rem;
  overflow: hidden;
}
.similar-product-info {
  font-size: 13px;
  overflow: hidden;
  position: relative;
  height: 0.325rem;
}
.rec-price-tag {
  border: 1px solid #fa2c19;
  color: #fa2c19;
  font-size: 12px;
  padding: 0 3px;
  margin-right: 5px;
  line-height: 14px;
  height: 14px;
  border-radius: 0.025rem;
}
.guess-button {
  display: block;
  position: absolute;
  top: 0.0375rem;
  right: -0.075em;
  text-align: center;
  color: grey;
  font-size: 0.125rem;
  height: 0.275rem;
  line-height: 0.275rem;
  padding: 0 0.125em;
  background-color: #f0f2f5;
  border-radius: 0.1375rem;
  border-top-right-radius: 0;
}
</style>
